
Ue.User = {
    init: function () {
        Ue.Common.select('user_index');
        this.list();
    },
    active: function (type) {
        $.post('/user/status', {"is_active": type}, function (rs, status) {
            if (rs.ret) {
                Ue.Common.success(rs.msg);
                return true;
            }
            Ue.Common.warning(rs.error);
        });
    },
    list: function () {
        var obj = {
            "ajax": {
                "url": "/user/list",
                "type": "POST"
            },
            "columns": [
                {"data": "first_name"},
                {"data": "last_name"},
                {"data": "position"},
                {"data": "office"}
            ]
        }
        obj = Ue.Common.extend(obj,Ue.Common.dataTable);
        //console.log(obj);
        $(".data-table").dataTable(obj);
    }
}

$(function () {
    Ue.User.init();
});


